<?php

class DateHelper {
    
    function month_de($date) {

            switch (date("m", strtotime($date))) {
                case 1:  return "Januar";
                case 2:  return "Februar";
                case 3:  return "März";
                case 4:  return "April";
                case 5:  return "Mai";
                case 6:  return "Juni";
                case 7:  return "Juli";
                case 8:  return "August";
                case 9:  return "September";
                case 10: return "Oktober";
                case 11: return "November";
                case 12: return "Dezember";
            }

            return $temp_str;
        }

        function day_de($date) {
            return date("d", strtotime($date));
        }

        function time_de($date) {
            return date("H:i", strtotime($date)) . ' Uhr';
        }

        /**
         * Function to generate a designed date field
         *
         * @author Miguel Gonzalez
         * @version 1.0
         * @since 23-12-2010
         *
         * @param <datetime> $date Value of the date
         *
         * @return string
         */
        function generateDateField($date) {

            $temp_str = '<div class="datefield">';
            $temp_str .= '<div class="day">' . $this->day_de($date) . '</div><div class="name">' . $this->month_de($date) . '</div>';
            $temp_str .= '<div class="time">' . $this->time_de($date) . '</div>';
            $temp_str .= '</div>';
            return $temp_str;
        }
        
        
        function generateLikeButton($url) {
        
        $content = '<div class="fb-like" data-href="' . $url . '" data-send="false" data-layout="box_count" data-width="88" data-show-faces="true" data-action="recommend" data-font="trebuchet ms"></div>';                             
        
        return $content;
        }


        function generateTweetButton($url, $text) {

            $content = '';

            return $content;

        }
        
        
        function generateGoogleButton($url) {
            return '';
        }
    
}
?>
